package projeto1;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;

import java.awt.Font;
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JTextField;
import javax.swing.JPasswordField;


public class AdcAdm extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private JPasswordField passwordField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AdcAdm dialog = new AdcAdm();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public AdcAdm() {
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBackground(SystemColor.text);
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel lblAdcionarNovoAdministrador = new JLabel("Adcionar Novo Administrador");
			lblAdcionarNovoAdministrador.setBounds(10, 92, 278, 24);
			lblAdcionarNovoAdministrador.setFont(new Font("Arial", Font.BOLD, 20));
			contentPanel.add(lblAdcionarNovoAdministrador);
		}
		{
			JLabel lblNewLabel = new JLabel("");
			lblNewLabel.setBounds(0, 0, 424, 92);
			lblNewLabel.setIcon(new ImageIcon("C:\\Users\\vania\\Desktop\\customLogo.gif.jpg"));
			contentPanel.add(lblNewLabel);
		}
		{
			JLabel label = new JLabel("");
			label.setBounds(217, 136, 0, 0);
			contentPanel.add(label);
		}
		{
			JLabel lblNewLabel_1 = new JLabel("Login:");
			lblNewLabel_1.setBounds(197, 146, 91, 14);
			lblNewLabel_1.setFont(new Font("Arial", Font.BOLD, 13));
			contentPanel.add(lblNewLabel_1);
		}
		{
			textField = new JTextField();
			textField.setBounds(252, 144, 172, 20);
			contentPanel.add(textField);
			textField.setColumns(10);
		}
		{
			JLabel lblNewLabel_2 = new JLabel("Senha:");
			lblNewLabel_2.setBounds(197, 187, 46, 14);
			lblNewLabel_2.setFont(new Font("Arial", Font.BOLD, 13));
			contentPanel.add(lblNewLabel_2);
		}
		{
			passwordField = new JPasswordField();
			passwordField.setBounds(252, 185, 172, 20);
			contentPanel.add(passwordField);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			
			{
				JButton button = new JButton("<<<Anterior");
				
				button.addActionListener(new ActionListener() {
					//Chama GerenciarAdm
					public void actionPerformed(ActionEvent e) {
						GerenciarAdm gerencia = new GerenciarAdm();
						gerencia.setVisible(true);
					}
				});
				
				buttonPane.add(button);
			}
			
			
			
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				
				cancelButton.addActionListener(new ActionListener() {
					//Chama GerenciarAdm 
					public void actionPerformed(ActionEvent e) {
						GerenciarAdm gerencia = new GerenciarAdm();
						gerencia.setVisible(true);
					}
				});
				
				buttonPane.add(cancelButton);
			}
		}
	}
}
